package com.ly.heart.service.impl;

import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import com.ly.common.utils.DateUtils;
import com.ly.heart.mapper.KingBadHandleMaterialDetailMapper;
import com.ly.heart.service.IKingBadHandleMaterialDetailService;
import org.springframework.stereotype.Service;
import com.ly.heart.domain.KingBadHandleMaterialDetailEntity;

import javax.annotation.Resource;

/**
 * 金蝶-不良品处理单物料明细其他信息Service业务层处理
 *
 * @author cxl
 * @date 2024-08-11
 */
@Service
public class KingBadHandleMaterialDetailServiceImpl extends ServiceImpl<KingBadHandleMaterialDetailMapper,KingBadHandleMaterialDetailEntity> implements IKingBadHandleMaterialDetailService {

    @Resource
    private KingBadHandleMaterialDetailMapper kingBadHandleMaterialDetailMapper;

    /**
     * 查询金蝶-不良品处理单物料明细其他信息
     *
     * @param id 金蝶-不良品处理单物料明细其他信息ID
     * @return 金蝶-不良品处理单物料明细其他信息
     */
    @Override
    public KingBadHandleMaterialDetailEntity selectKingBadHandleMaterialDetailEntityById(String id)
    {
        return kingBadHandleMaterialDetailMapper.selectKingBadHandleMaterialDetailEntityById(id);
    }

    /**
     * 查询金蝶-不良品处理单物料明细其他信息列表
     *
     * @param kingBadHandleMaterialDetailEntity 金蝶-不良品处理单物料明细其他信息
     * @return 金蝶-不良品处理单物料明细其他信息
     */
    @Override
    public List<KingBadHandleMaterialDetailEntity> selectKingBadHandleMaterialDetailEntityList(KingBadHandleMaterialDetailEntity kingBadHandleMaterialDetailEntity)
    {
        return kingBadHandleMaterialDetailMapper.selectKingBadHandleMaterialDetailEntityList(kingBadHandleMaterialDetailEntity);
    }

    /**
     * 新增金蝶-不良品处理单物料明细其他信息
     *
     * @param kingBadHandleMaterialDetailEntity 金蝶-不良品处理单物料明细其他信息
     * @return 结果
     */
    @Override
    public int insertKingBadHandleMaterialDetailEntity(KingBadHandleMaterialDetailEntity kingBadHandleMaterialDetailEntity)
    {
        kingBadHandleMaterialDetailEntity.setCreateTime(DateUtils.getNowDate());
        return kingBadHandleMaterialDetailMapper.insertKingBadHandleMaterialDetailEntity(kingBadHandleMaterialDetailEntity);
    }

    /**
     * 修改金蝶-不良品处理单物料明细其他信息
     *
     * @param kingBadHandleMaterialDetailEntity 金蝶-不良品处理单物料明细其他信息
     * @return 结果
     */
    @Override
    public int updateKingBadHandleMaterialDetailEntity(KingBadHandleMaterialDetailEntity kingBadHandleMaterialDetailEntity)
    {
        return kingBadHandleMaterialDetailMapper.updateKingBadHandleMaterialDetailEntity(kingBadHandleMaterialDetailEntity);
    }

    /**
     * 批量删除金蝶-不良品处理单物料明细其他信息
     *
     * @param ids 需要删除的金蝶-不良品处理单物料明细其他信息ID
     * @return 结果
     */
    @Override
    public int deleteKingBadHandleMaterialDetailEntityByIds(String[] ids)
    {
        return kingBadHandleMaterialDetailMapper.deleteKingBadHandleMaterialDetailEntityByIds(ids);
    }

    /**
     * 删除金蝶-不良品处理单物料明细其他信息信息
     *
     * @param id 金蝶-不良品处理单物料明细其他信息ID
     * @return 结果
     */
    @Override
    public int deleteKingBadHandleMaterialDetailEntityById(String id)
    {
        return kingBadHandleMaterialDetailMapper.deleteKingBadHandleMaterialDetailEntityById(id);
    }
}
